package org.freemarker.core.dao;

import java.util.List;

import org.freemarker.core.model.BaseEntity;
import org.freemarker.core.model.Contact;

/**
 * Definition for common methods for all entities.
 * 
 * @author catalin.vladoiu
 * 
 * @param <T>
 */
public interface EntityJpaDao<T extends BaseEntity> {

	T findOne(final Long id);

	List<T> findAll();
	
	List<T> findLast();

	Long save(final T entity);

	void update(final T entity);

	void delete(final T entity);

	void deleteById(final Long entityId);

	void updateById(Long entityID);

	void deleteByName(Long entityID);

	void saveContact(Contact c);
	
	void updateBySecurityNumber(String securityNumber);

	//List<T> findNotUsed();

}
